﻿<Window x:Class="MCDA.NormalizationSelectionView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:MCDA.Model"
        Title="Normalization"
        WindowStyle="ToolWindow"
        ShowInTaskbar="False"
        ResizeMode="NoResize"
        WindowStartupLocation="CenterOwner"
    Height="240" Width="330">
    <Grid Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="170"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <TabControl VerticalAlignment="Stretch" Margin="5,5,5,5">
            <TabItem Header="General" Height="22" VerticalAlignment="Bottom">
                <Grid Background="White">
                    <Grid.Resources>
                        <local:EnumToBooleanConverter x:Key="enumToBooleanConverter" />
                    </Grid.Resources>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="10" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="10" />
                        <RowDefinition Height="20" />
                        <RowDefinition Height="20" />
                        <RowDefinition Height="20" />
                    </Grid.RowDefinitions>
                    <RadioButton Grid.Row="1" Grid.Column="1" IsChecked="{Binding SelectedTransformationStrategy, ConverterParameter={x:Static local:NormalizationStrategy.IdentityNormalizationStrategy}, Converter={StaticResource enumToBooleanConverter}}"  Content="Identity Normalization" ToolTip="Does not perform any kind of Normalization." />
                    <RadioButton Grid.Row="2" Grid.Column="1" IsChecked="{Binding SelectedTransformationStrategy, ConverterParameter={x:Static local:NormalizationStrategy.MaximumScoreNormalizationStrategy}, Converter={StaticResource enumToBooleanConverter}}"  Content="Maximum Score Normalization" ToolTip="Produces values between 0 and 1, where cost criteria is anchored at 0 and benefit criteria at 1." />
                    <RadioButton Grid.Row="3" Grid.Column="1" IsChecked="{Binding SelectedTransformationStrategy, ConverterParameter={x:Static local:NormalizationStrategy.ScoreRangeNormalizationStrategy}, Converter={StaticResource enumToBooleanConverter}}"  Content="Score Range Normalization" ToolTip="The lowest value will be zero and the highest 1. Does not preserve proportionality." />
                </Grid>
            </TabItem>
        </TabControl>
        <Grid Grid.Column="0" Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="75" />
                <ColumnDefinition Width="75" />
                <ColumnDefinition Width="75" />
                <ColumnDefinition Width="5" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="25" />
                <RowDefinition Height="5" />
            </Grid.RowDefinitions>
            <Button Content="Cancel" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="1,1,1,1" Command="{Binding Path=CancelCommand}"  />
            <Button Content="Apply" Grid.Row="1" Grid.Column="2"  HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="1,1,1,1" Command="{Binding Path=ApplyCommand}"   />
            <Button Content="OK" Grid.Row="1" Grid.Column="3" HorizontalAlignment="Stretch"  VerticalAlignment="Top" Margin="1,1,1,1" Command="{Binding Path=OkayCommand}" />
        </Grid>       
    </Grid>
</Window>
